﻿@{
    ViewBag.Title = "年度分析";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script src="@Url.Content("~/Scripts/jgcharts.js")" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
    var api;
    $(document).ready(function () {
        api = new jGCharts.Api();//实例化一个图表对象
        var opts = {
                        data: [[153, 60], [113, 70], [120, 80], [110, 80]], //统计出来的数据
                        axis_labels:['第1季度','第2季度','第3季度','第4季度'], //设置横轴显示的文本
                        legend: ['营业额(RMB)', '利润(RMB)'],     //数据表示的含义
                        colors : ['4b9b41','41599b'],               //设置图表的颜色
                        bar_width : 30,                             //图表的宽度
                        bar_spacing: 1,                             //default 1
                        size : '400x400',            //default 300x200 (width x height) - maximum size 300,000 pixels
                        title       : '季度分析',                   //标题，default false
                        title_color : 'a98147',                     //标题颜色
                        title_size  : 20                            //标题字体大小，默认 10
                    };
        jQuery('<img>') 
            .attr('src', api.make(opts))//设置图表的属性
            .appendTo("#bar1");//将统计的数据生成图表加入到指定的div中去
    });
    
</script>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color: White;"
    align="center">
    <tr>
        <td class="mbg">
            <table cellspacing="0" cellpadding="0" width="100%" border="0" valign="top">
                <tr>
                    <td>
                        <table style="height: 23px;" cellspacing="0" cellpadding="0" width="120" background="@Url.Content("~/Content/Images/m_17.gif")"
                            border="0">
                            <tr>
                                <td>
                                    <span class="contentPageTitle">&nbsp;&gt;&gt; 季度分析</span>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="titleContentDivider" height="6">
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<p>
    <a href="#">查看明细</a>
</p>
<p>
    <div>
        <span>年份：</span>@Html.DropDownList("year", new SelectList(ViewBag.MonthList), "------请选择-----")</div>
</p>
<div id="bar1">
</div>
